package com.randi.system.domain.vo;

import com.randi.system.domain.entity.sysNotice.SysNotice;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@ApiModel(value = "SysNoticeInfo", description = "公告信息")
public class SysNoticeInfo extends SysNotice {

    @ApiModelProperty(value = "用户列表")
    List<SysNoticeUser> users;

    @ApiModelProperty(value = "已读总数")
    Integer readTotal;

    public SysNoticeInfo(SysNotice sysNotice) {
        this.setNoticeId(sysNotice.getNoticeId());
        this.setNoticeTitle(sysNotice.getNoticeTitle());
        this.setNoticeContent(sysNotice.getNoticeContent());
        this.setNoticeType(sysNotice.getNoticeType());
        this.setPushRange(sysNotice.getPushRange());
        this.setNoticeTypeName(sysNotice.getNoticeTypeName());
        this.setPushRangeName(sysNotice.getPushRangeName());
    }

}
